%
%\documentclass[letterpaper,12pt]{article}
%\usepackage[x11names,rgb]{xcolor}
%\usepackage{tikz}
%\usetikzlibrary{snakes}
%\usetikzlibrary{arrows}
%\usetikzlibrary{shapes}
%\usetikzlibrary{backgrounds}
%\usepackage{amsmath}
%\oddsidemargin 0in
%\evensidemargin 0in
%\topmargin 0in
%\headheight 0in
%\headsep 0in
%\textheight 9in
%\textwidth 6.5in
%\begin{document}
%\pagestyle{empty}
%\vspace*{\fill}
%\begin{center}
\documentclass{article}
 
\usepackage[pdftex,active,tightpage]{preview}
\usepackage{tikz}
\usetikzlibrary{snakes}
\usetikzlibrary{arrows}
\makeatletter
 
\begin{document}
\begin{preview}
	%%
	\begin{tikzpicture}[scale=0.5]
	 %Base Octree
	 \draw[thick, xstep=8, ystep=8] (0,0) grid (16,16);
	 \draw[thick, xstep=4, ystep=4] (0,0) grid (8,8);
	 \draw[thick, xstep=2, ystep=2] (4,4) grid (8,8);
	 
	 %Balancing Octants
	 \fill[semitransparent, green!50] (6,6) rectangle (9,9);
	
	 %Current Octant
	 \fill[opaque, blue] (7.5,7) rectangle (8,7.5);
	
	 \draw[thick, xstep=1, ystep=1] (6,6) grid (8,8);
	 \draw[thick, xstep=0.5, ystep=0.5] (7,7) grid (8,8);
	 \draw[thick, xstep=1, ystep=1] (6,6) grid (9,9);
	
	 %Labels
	 
	 %Balancing Octants
	 \draw (4,10.8) node {Balancing};
	 \draw (4,10) node {Octant};
	 \draw[->] (4,9.5) -- (6.5,8.5);
	 
	 % Current Octant
	 \draw (10,5) node {Current};
	 \draw (10,4.2) node {Octant};
	 \draw[->] (10,5.5) -- (7.75,7.25);
	 
	\end{tikzpicture}%%
\end{preview}
\end{document}

%\end{center}
%\vspace*{\fill}
%\end{document}

    	